<?php
class User
{
	
	private $_auth = false;
	public $_id;
	public $_name;
	public $_email;
	public $_googleName;
	public $_googlePassword;

	public function __construct(/**/)
	{
		$args = func_get_args();
		if(count($args) == 2)
		{
			$dbAcces = new db();
			$res = mysql_fetch_assoc($dbAcces->get("*","name='".$args[0]."' AND password='".md5($args[1])."'","bl_members"));
			if(sizeof($res) > 1)
			{
				$this->_id = $res["userID"];
				$this->_name = $res["name"];
				$this->_email = $res["email"];
				$this->_googleName = $res["googleName"];
				$this->_googlePassword = $res["googlePassword"];
				$this->_auth = true;
			}
		}
	}
	
	public function auth()
	{
		return $this->_auth;
	}
}
?>